Original URL: http://zhu8337797.blog.163.com/blog/static/170617549201122512712136/
Command
Options
function
BASH–X Pin Name
Echo Echo
Displays each row of the script after the variable is replaced
Knowledge before learning shell scripts1) Record command historyThe commands we've knocked on, Linux will be recorded, and presets can record 1000 historical commands. These commands are saved in the. bash_history file in the user's home directory.
What is a shell script. First, it is a script and cannot be used as a formal programming language. Because it's running in the shell of Linux, it's called a shell script. To be blunt, a shell script is a collection of commands. For example, I want
I don't know if there's anything to clean up. A directory history file needs to be cleaned. There will probably be a lot of other places to clean up the history files, which may be used.
I spent the past two days writing a script, cleaning more
Test switch and special parameters in Shell script, shell script1. Test Switch
The following table lists the meanings of the test commands and whether they can be used in test commands, bash, and ksh.
Switch
Test
Bash
Ksh
The shell is a programming language and a service that accesses the operating system kernel.The types of shell that are common to Linux are:Bourne Shell (/usr/bin/sh or/bin/sh)Bourne Again Shell (/bin/bash)C Shell (/USR/BIN/CSH)K Shell (/usr/bin/ksh)
This article mainly summarizes the entry-level bash from the following aspects:
1. Command history and command completion
2. Pipelines and redirection
3. Command alias and command replacement
4. Edit the command line
5. File Name Configuration
6.
Shell script Programming "on"A program is a combination of instructions and data.Program Programming Style:Program: command-centric, data-serving instructionImage: Data-centric, command-serving dataProgramming Languages:Low Level:
Shell script entry, shell script
There are two ways to use Shell script:
① Interactive: each time a user inputs a command, the Shell immediately executes the command;
② Batch: You can compile a complete Shell script to execute many commands in the
1. shell scripts are case sensitive2. Special Unix characters: (; $? & * () [] ''+ Escape ()3. Shell Comments start #4. Function DefinitionFunction fuction_name (){Command to execute}Function_name is directly used for calling.5. Control Structure1)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.